const mongoose = require('mongoose')
// 创建一个约束对象
const adminSchema = mongoose.Schema({
    adminName : {
        type:String,
        required:true,//是否必填
        unique:true,//是否唯一
    },
    password : {
        type:String,
        required:true,
    },
    regTime:{
        type:String,
        required:true
    },
    loginTime:{
        type:String,
        required:true,
        default:"---"
    }
})


// 根据约束对象创造集合
const adminModel = mongoose.model("adminList",adminSchema)

module.exports = adminModel;